package com.wkh.datastructure.priorityqueue;

public class Entry implements Priority{
    private String value;
    private int priority;

    public Entry(String value, int priority) {
        this.value = value;
        this.priority = priority;
    }

    /**
     * @return 返回对象的优先级, 约定数字越大，优先级越高
     */
    @Override
    public int priority() {
        return priority;
    }

    @Override
    public String toString() {
        return "Entry{" +
                "value='" + value + '\'' +
                ", priority=" + priority +
                '}';
    }

}
